Skip to content

Conversation

@cfrontin
Copy link
Collaborator

@cfrontin cfrontin commented Jul 17, 2025

Addresses #112

Adds parallel check to ensure examples are not broken by changes, these are consolidated with unit and system testing into consolidated CI/CD testing.

@cfrontin cfrontin self-assigned this Jul 17, 2025
@cfrontin cfrontin linked an issue Jul 17, 2025 that may be closed by this pull request
@cfrontin cfrontin marked this pull request as ready for review July 17, 2025 22:06
Copy link
Contributor

@jaredthomas68 jaredthomas68 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Just a few minor comments and questions

@cfrontin cfrontin merged commit d386e95 into NLRWindSystems:develop Jul 21, 2025
20 checks passed
@cfrontin cfrontin deleted the bugfix/gluecode-model-options branch July 21, 2025 21:50
cfrontin added a commit that referenced this pull request Oct 1, 2025
* correct print statement

* run black

* try unique files for macos and linux

* run black

* skip unit tests for collection for pyrite test

* run black

* use macos npz file for mac tests

* have openmdao ignore derivatives of load in cable design

* run black

* skip pyrite test on linux os

* have windows use the linux npz file

* point to the github repo instead of the gitlab repo

* update time limit for optiwindnet solver

* use https link for optiwindnet

* correct call to github

* lower mip_rel_gap

* use optiwindnet from pypo
pypi

* allow user to specify max turbines per cable string, solver, and solver options for optiwindnet

* run black

* change default solver for optiwind from scip to appsi_highs

* refactor from  to  to try to fix circular imports

* adjust imports, correct function call inside point to mooring

* run black

* recovering intended behavior for package imports and improved __init__.py setup

* start offshore example directory and move over mooring constraint sandbox

* added optimization demo file and some changes to get things to work.

* draft of simple mooring design

* run black

* run black

* changes before including jareds

* got optimization working for collection length

* adjust optiwindnet wrapper to be able to deal with ghost helper nodes optiwindnet can produce.

* typo fix and updates to optimization problem

* black reformat

* offshore optimization demo coming along

* only adjust length for units and do all calculations in km

* run black

* turn off pyomo solver printing by default

* add opt to final print

* optimization demo touchup

* add turbine spacing component

* include turbine_spacing in example

* run black

* add units to substation locations

* black reformat

* some vectorization and only jit top-level function used in openmdao component

* run black

* adjust jit usage

* comment problematic imports

* import all of ard in fullfarm.py

* relative import to avoid circular imports

* narrow import scope in spacing.py

* include spacing constraint files

* correct spacing import

* don't rename when using jit

* don't use local import

* attempt to deal with circular imports

* working on tracking down real source of circular import

* i think i fixed the package structure

* commiting in some prototype stuff.

* switch to floating in example

* make utils directory and include geometery functions for boundary handling

* set up to test broken up utils

* mimic new file structure in unit tests

* complete refactoring changes for new utils organization

* remove boundary work for organization pr

* refactor ard.utils.utils to ard.utils.core and remove init import of utils

* fix typo

* run black

* add initial documentation explanation for utils

* move create_FLORIS_turbine to floris.py and for load_turbine_spec to utils/io.py

* update docs for utils with new io file

* include io.py

* Feature/offshore development geomorphology (#64)


* added in some geomorphology stuff, but it's not quite done yet.

* geomorphology touchups

* added testing and increasingly good geomorphology

* fully tested geomorphology up to but excluding point estimation

* Update test/unit/ard/test_geomorphology.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* fix typo

* added the pyrite file

* geomorphology most of the way

* add pyrite file

* updated geomorphology. slightly cleaner.

* update dependencies

* typo fix from copilot on test/unit/ard/test_geomorphology.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* realized a better way to do parent class and redid a bunch... like a moron

* fix bathymetery notebook for recent changes.

* some fixes

* reorganize and slightly update tests

* continuing to address jareds recommendations

* forgot pyrite

* derivatives only on interp call

* @jaredthomas68 offered me a blue pill and a red pill and i took the red one and could suddenly see pytest subtests all around me.

* update array equality nitpick from copilot

* black reformat

* updates for jared's suggestions toward PR

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Boundary (#67)

* include utility functions for polygon boundary constraints

* rename get_closest_point to get_closest_point_on_line_seg

* include tests for point_on_line

* include unit tests for single_polygon_normals_calculator

* vectorize single_polygon_normals_calculator

* jit normals calculator

* include multi-polygon normals tests with heterogenous polygon shapes and point counts and a generaic polygon_normals_calculator

* stash polygon work for a bit

* minor comment update

* loosen rtol for point_to_polygon numeric deriv check

* switch from jit decorator to jit function

* get multi-point multi-polygon working unvectorized

* vectorize and make multi point to multi polygon function differentiable

* get derivatives working for multi point to multi polygon distance

* add tests for get_nearest_polygons

* do sparse patrial computation for polygon boundary and include derivative tests for boundary component

* include boundary and related unit tests

* update shift default back to 1E-10

* run black

---------

Co-authored-by: Cory Frontin <cory.frontin@nrel.gov>

* add replace markers

* fix opt demo

* silly un-reversion to preserve history

* Propogate python version (#70)

* (prep to) liberate python 3.13 (#69)

* liberate python 3.13

* actually liberate python

* update testing

* version number inequality fix

* walkback python for backdated wisdem

* propogate to tests

* liberate python 3.13

* remove extraneous whitespace

* Pull up testing settings to match develop and main

* update dependencies

* revert wisdem to match main rather than dev

* silly un-reversion to preserve history

* Propogate python version (#70)

* (prep to) liberate python 3.13 (#69)

* liberate python 3.13

* actually liberate python

* update testing

* version number inequality fix

* walkback python for backdated wisdem

* propogate to tests

* liberate python 3.13

* remove extraneous whitespace

* Docs (#71)

* reorganize docs to follow the Divio paradigm

* add instructions for building and viewing the documentation locally

* update readme with test badges and docs link

* fix ASCII diagram to render properly in docs build

* fix typo

* Offshore development: improve documentation (#74)

* extend docstrings, clean up comments, and do some minor refactoring

* rename violation_distance to mooring_spacin

* update docstrings for mooring distances

* include offshore fixed-foundation example (#77)

* include offshore fixed-foundation example

* Prep for offshore meeting (#78)

note: some temporary code is in the examples, to facilitate cooperative development

---

* update dependencies

* revert wisdem to match main rather than dev

* silly un-reversion to preserve history

* Propogate python version (#70)

* (prep to) liberate python 3.13 (#69)

* liberate python 3.13

* actually liberate python

* update testing

* version number inequality fix

* walkback python for backdated wisdem

* propogate to tests

* liberate python 3.13

* remove extraneous whitespace

* rename mooring design to create space for detailed mooring design

* updated geomorphology/material data storage objects

* added detailed mooring design example

* forgot example script

* Better temporary script (#79)

* update dependencies

* revert wisdem to match main rather than dev

* silly un-reversion to preserve history

* Propogate python version (#70)

* (prep to) liberate python 3.13 (#69)

* liberate python 3.13

* actually liberate python

* update testing

* version number inequality fix

* walkback python for backdated wisdem

* propogate to tests

* liberate python 3.13

* remove extraneous whitespace

* rename mooring design to create space for detailed mooring design

* updated geomorphology/material data storage objects

* added detailed mooring design example

* forgot example script

* reorganize example

* Landbosse cable connection from optiwindnet (#80)

* add primary spacing approximation and unit tests for converting from interarray to landbosse
* switch onshore example to use approximate connection between cable design and landbosse

* point to floris release version instead of develop

* remove detailed mooring import

* remove unnecessary commented code

* run black

* remove secondary setup_partials method from PlaceholderAEP

* Feature/bos layout improvement (#73)

* capitalize ORBIT acronym everywhere

* fix merge issues

* small fixes

* update dependencies

* revert wisdem to match main rather than dev

* silly un-reversion to preserve history

* Propogate python version (#70)

* (prep to) liberate python 3.13 (#69)

* liberate python 3.13

* actually liberate python

* update testing

* version number inequality fix

* walkback python for backdated wisdem

* propogate to tests

* liberate python 3.13

* remove extraneous whitespace

* rename mooring design to create space for detailed mooring design

* updated geomorphology/material data storage objects

* added detailed mooring design example

* forgot example script

* reorganize example

* add glue design doc temporarily (#89)

* copy in input files for IEA 740 10 ROWP

* reorganize example 01 a bit

* wip

* glue code working, but not with wisdem yet

* minor typo correction

* recursive glue mostly working

* run script and input file for glue code example

* attempt to get laten variable setting working with glue code

* remove spacing connection to landbosse in favor of approximation from optiwindnet

* update wisdem wrap and onshore and offshore examples to accomodate more generic latent variable set up

* correct logic and which landbosse components are used

* remove unneeded group and adjust calls from group to component

* run black

* more comments, and break out duplicate code into its own function

* add test for set_values

* try turning off numba jit to see if that solves the numba problem

* remove disable numba jit

* address circular import

* pin numpy

* only install ard once for each test suite

* pin numpy to 1.24.3

* pin numpy to 2.0

* pin numpy < 2.3

* cap numpy at 2.3 for numba compatibility

* restrict python version to less than 3.13

* remove comments

* use test dependencies for optiwindnet

* pin optiwindnet version

* run black

* Develop (#99)

* (prep to) liberate python 3.13 (#69)

* liberate python 3.13

* actually liberate python

* update testing

* version number inequality fix

* walkback python for backdated wisdem

* propogate to tests

* remove comments

* get latent variable setting working automatically

* get 02_onshore running

* fix mapping bug in glue code

* get optimization working for onshore example using glue code

* optimization onshore example working with gluecode prototype

* include convergence plot

* run black

* remove commented connections

* update onshore example for new glue code

* update file paths

* update onshore example to use set_up_ard_model

* Improve feature/system tests (#100)

* (prep to) liberate python 3.13 (#69)

* liberate python 3.13

* actually liberate python

* update testing

* version number inequality fix

* walkback python for backdated wisdem

* propogate to tests

* remove comments

* constraint testing added

* black reformatting

* added updated pyrite

* system test added but not complete for mooring packing

* add forgotten file

* Black reformat

* switch to using OM derivative checks, clean up

* black reformat

* Update test/system/ard/geometry/test_constraints.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update test/system/ard/geometry/test_constraints.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update test/system/ard/offshore/test_mooring_packing.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update test/system/ard/offshore/test_mooring_packing.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update test/system/ard/geometry/test_constraints.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* tidy comments

* fix the problem discovered by the not problem that jared pointed out hahahaha

* barely avoided ragequitting due to black reformat

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Feature/wisdem upgrade (#102)

* (prep to) liberate python 3.13 (#69)

* liberate python 3.13

* actually liberate python

* update testing

* version number inequality fix

* walkback python for backdated wisdem

* propogate to tests

* remove comments

* update pyrite values

* fixes to 3.21 rather than 3.20

* update test utils for clarity

* a little more improvement to the test utils

* black reformat...

* wip creating default systems for ard api

* move LCOE stack tests into api test directory

* wip api

* api unit test

* bring clarity to pyrite test

* working out wisdem differences

* wip debug wisdem

* roll back to older ard compoent

* wip working on debugging LandBOSSE Ard wrapper

* restore old landbosse comp naming

* get all tests passing

* convert LCOE stack test to new glue code

* fixing tests with new inputs

* new files to work with path restrictions

* all tests passing again

* set up offshore fixed bottom and floating w/o cable default systems

* include new default systems in unit test

* run black

* include default system design files

* including initial des var values in modeling options

* use total capex from landbosse and bos capex in financese

* use decorator

* include input files

* run black

* include input files for onshore example

* include deprecated api

* working towards offshore optimization demo refactor, still not matching on optimization results

* black refactor

* black reformat 2

* fixed 03_offshore

* cleared out offshore folder of extraneous example data, still need to move two ipynb files and can delete outdated offshore example

* remove old FLORIS power comparison examples, they're no longer relevant

* debugging

* run black

* edit .gitignore and include example 04_offshore_fixed

* update offshore fixed example for glue code

* swap numbering for fixed and floating examples

* run black

* include inputs for all examples

* include system tests for new glue code for floating and offshore fixed

* run black

* include offshore fixed and floating systems defaults with cable design

* include system test inputs for offshore fixed and floating tests

* close back ticks in docstring

* remove deprecated examples

* update doc strings

* update doc string

* update doc string

* updated the example, removed LCOE stack

* black reformat

* include approx totals in all default systems and remove old debug code

* run black

* Update test/unit/ard/farm_aero/test_templates.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update test/system/ard/api/test_LCOE_OFL_stack.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update test/unit/ard/farm_aero/test_templates.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* remove trailing comma and comment out unused check tol

* Update OptiWindNet to version 0.0.4 (#101)

* chore: bump optiwindnet version to 0.0.3 and make pyproject.toml include subpackages

* fix: overhaul of optiwindnet_wrap to work with v0.0.3

* fix: update demos to use path relative to demo script and optiwindnet v0.0.3

* wip: initial adjustment of optiwindnet tests to v0.0.3

Many more changes are needed since the two level wrapping was changed to a single level. Also the tests are not taking into account links between turbines that use detours or contours and, therefore, have lengths that do not correspond to the Euclidean distance between the coordinates.

* fix: add border features to site in optiwindnetCollection.site_from_inputs()

* chore: clean up confusing code comments

* chore: black-format .py files

* wip: attempt to fix CI errors by using main branch of statsmodels

* Change optiwindnet to v0.0.4 to fix error on MacOS

* fix: update obsolete mip_rel_gap to mip_gap

* fix: new data structure for optiwindnet-generated data

The cable lengths and loads are ordered in robust way. If the networks are the same, the length/load values must match independent of platform. To guarantee that the solution
network is the same, the optimum must be unique and there must be enough time to reach it

* lint with black

* fix: reference to outdated appsi_highs

* chore: improved docstring and type hinting

* fix: add missing import

* fix: test failure due to length_cables being an output but not having partials calculated

The OpenMDAO check_partials() expects partials for all declared outputs. Since partials wrt the length_cables array are not calculated in compute_partials(), the length_cables output was moved to discrete_outputs().

* test: add test with border to improve code coverage

* lint with black

* minor changes to accomodate optiwind net version update

* run black

* Bugfix: gluecode model options (#113)

* hotfix

* add the actual hotfix

* update all examples

* added example testing routine to test

* adjust cwd command

* reorganize some examples

* attempt fix

* black reformat, pip statsmodels again after their hotfix

* ok think i fixed it

* cleanup runner

* try system-agnostic runner

* try system-agnostic runner again

* indent fix

* turn off n2 diagrams

* test consolidated CI/CD workflow

* attempt improved consolidated script

* direct parallel example runner test

* complete runner code

* a new test that should maybe actually work

* add missing file and quotation marks

* switch to consolidated with parallel examples

* rectify author attribution in pyproject.toml

* remove commented dependency

* cleaner gui interaction

* modified consolidated tests

* faster consolidated ci/cd

* rollback action

* take 2 on caching

* update dependency

* slight bugfix mod

* try cache again

* iterating on cicd cache

* reorder

* rename
 test

* address some of jareds comments and remove commented code

* black reformat

* Update README.md with new badge order

* ORBIT BOS upgrade for detailed farms, redux (#106)

* re-try the bos-layout-improvement branch

* Update ard/cost/orbit_wrap.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* black reformat

* update collection stuff after PRs, address some of jareds comments

* black reformat

* addressing more of jareds commentary

* fixed jareds concerns

* black reformat...

* remove some deprecated debugging statements while i'm at it

* missed one, comment touch-up

* switch to radial for examples, add outputs

* address error message

* add radial branching testing

* updated cable length availability list, modified to used dynamic w/ floating and not otherwise

* black reformat

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update README.md badge

* Improved OM driver interface, take II (#123)

* enable passing opt_settings to openmdao

* rename variables for copilot suggestions

* black reformat

---------

Co-authored-by: Jared Thomas <jaredthomas68@gmail.com>

* WindIO conversion (#120)

* work in progress

* more progress on the windIO-plant integration

* black reformat and some changes to FLORIS

* farm aero with windIO seems to be working

* updated up to landuse

* changes to unit testing plus some black reformatting

* layouts completely ready for windIO

* farm_aero templates updated for windio

* some floris progress, now outdated; re-factor begin to get windIO_plant in modeling_options

* more working through the refactor

* working through layout now

* layout done

* more updates, buggy floris still

* floris bug fixed

* touch-ups

* black reformat

* updated FLORIS example to share windIO_plant turbine plugin

* fixed the system constraint test...

* remove old code

* remove outmoded data

* WIP working through system tests, some renames of shared data files

* windIO seems to be pushed through all unit/system tests except ones requiring WISDEM-derived components

* remove debug stuff

* wisdem update

* black reformat

* orbit failing tests but integrated

* adjusted setup latents... not sure about it yet...

* adjustments

* black reformat

* Update pyproject.toml to include windio

* temporary disable

* uncomment system

* enable passing opt_settings to openmdao

* merging some of jareds changes

* pyrite adjustment with working WISDEM stuff less detailed ORBIT

* tests progressing

* get example 01_onshore working with update wisdem interface

* remove example _01

* unit tests appear to be working

* orbit and wisdem wraps updated and functioning w.r.t. unit tests

* black reformat

* landbased fixed, aep only major deviation due to fixed typo in windio branch

* adjusting for some changes, cleaning out documentation swaps

* remove old doc string hangarounds

* black

* what a slog... making progress

* no more ERRORS just FAILURES, and some really significant one so something is definitely wrong. unit tests are still working well

* AEP from batch aero

* remove trailing space and black

* system tests much cleaner.

* update pyrite and other reference values

* update example 03

* move plot stuff in example 1 to ard.viz

* allow plotting of boundaries and cabling in single plot call

* oops forgot some stuff and now some work on 02 also

* 03 working 02 working

* update 01

* rename optiwindnet_coll to collection

* cleaner formatting

* black reformat

* specify units in latents

* tonne fix

* more tonnes of fixes

* a tonne yet still i hath not seen

* WIP modifications for getting the units right

* fix units

* fixed unit issues

* nicer names in the example yamls

* black reformat

* Update test/unit/ard/farm_aero/test_floris.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* fix black thanks to copilot...

* tranche no. 1 of jared edits

* remove old files, correct ard_system in example 01

* adjust unit tests to function w/ TI

* fix some small issues

* small tidy

* more tidy

* tranche two

* run windIO plant validation by default before setting up the ard system

* added template docstrings

* added viz docstrings

* more addressment of jareds comments

* addressed reference question

* hotfix the example 03 wind resource

* final edits for squash

* one more time.... evenutally gonn get TIs right

---------

Co-authored-by: Jared Thomas <jaredthomas68@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Hotfix/floris zeroed prob (#127)

* fix the floris issue

* actual fix

* black config

* Clarify thrust data unpacking process w/ git reference

* streamline based on copilot suggestion

* fix failing floris test

* Change optiwindnet version constraint to exact match

* Cherry-pick key general improvements from offshore-development for beta (#136)

* cherrypick some improvements for beta out of offshore-development

* black reformat

* address copilot comments

* Docs overhaul (#133)

* enable passing opt_settings to openmdao

* some touch-ups to get started

* updates to logo and documentation

* cherrypick some improvements for beta out of offshore-development

* black update

* black reformat

* address copilot comments

* update some docs

* addressing jared comments

* update installation page

* a tranche of docs mods

* a new tranche of edits

* more cleanup

* adjust some busted windio yamls and involved documentation

* update with examples

* example one working it appears

* attempt nb example stuff

* adjust find nb script

* adjust again

* save example 02 notebook

* added example 02 to docs

* add jupyter to dev requirements

* temporary withhold non-notebook tests, and update 02 notebook.

* update file location

* update examples

* try try again

* actually relative paths are apparently better...

* update through ex 03

* re-enable full testing sweet

* tiny fix

* fix wordiness

* docs playing nicely now

* reorganize mv typo

* fix consolidated CI/CD to restore precedence.

* incorporate pietro's comments from cfrontin/Ard PR#4

---------

Co-authored-by: Jared Thomas <jaredthomas68@gmail.com>

* fix: make optiwindnet wrapper compatible with optiwindnet v0.0.6 (#135)

* fix: make optiwindnet wrapper compatible with optiwindnet v0.0.6

* fix: optiwindnet's version must be >= 0.0.6, otherwise OWNWarmupFailed is not available

* fix: add missing model_option filter for using EW_presolver

---------

Co-authored-by: Cory Frontin <cory.frontin@nrel.gov>

* Fix badge link in README.md

* fix to floris reference height (#140)

* fix to floris reference height

* update after floris ref height and density fix

* black reformat

* remove outmoded coveragerc entries.

---------

Co-authored-by: Jared Thomas <jaredthomas68@gmail.com>
Co-authored-by: Jared Thomas <jaredthomas68@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Mauricio Souza de Alencar <856825+mdealencar@users.noreply.github.com>
cfrontin added a commit that referenced this pull request Oct 20, 2025
* fix to floris reference height

* update after floris ref height and density fix

* black reformat

* remove outmoded coveragerc entries.

* Beta release (#137)

* correct print statement

* run black

* try unique files for macos and linux

* run black

* skip unit tests for collection for pyrite test

* run black

* use macos npz file for mac tests

* have openmdao ignore derivatives of load in cable design

* run black

* skip pyrite test on linux os

* have windows use the linux npz file

* point to the github repo instead of the gitlab repo

* update time limit for optiwindnet solver

* use https link for optiwindnet

* correct call to github

* lower mip_rel_gap

* use optiwindnet from pypo
pypi

* allow user to specify max turbines per cable string, solver, and solver options for optiwindnet

* run black

* change default solver for optiwind from scip to appsi_highs

* refactor from  to  to try to fix circular imports

* adjust imports, correct function call inside point to mooring

* run black

* recovering intended behavior for package imports and improved __init__.py setup

* start offshore example directory and move over mooring constraint sandbox

* added optimization demo file and some changes to get things to work.

* draft of simple mooring design

* run black

* run black

* changes before including jareds

* got optimization working for collection length

* adjust optiwindnet wrapper to be able to deal with ghost helper nodes optiwindnet can produce.

* typo fix and updates to optimization problem

* black reformat

* offshore optimization demo coming along

* only adjust length for units and do all calculations in km

* run black

* turn off pyomo solver printing by default

* add opt to final print

* optimization demo touchup

* add turbine spacing component

* include turbine_spacing in example

* run black

* add units to substation locations

* black reformat

* some vectorization and only jit top-level function used in openmdao component

* run black

* adjust jit usage

* comment problematic imports

* import all of ard in fullfarm.py

* relative import to avoid circular imports

* narrow import scope in spacing.py

* include spacing constraint files

* correct spacing import

* don't rename when using jit

* don't use local import

* attempt to deal with circular imports

* working on tracking down real source of circular import

* i think i fixed the package structure

* commiting in some prototype stuff.

* switch to floating in example

* make utils directory and include geometery functions for boundary handling

* set up to test broken up utils

* mimic new file structure in unit tests

* complete refactoring changes for new utils organization

* remove boundary work for organization pr

* refactor ard.utils.utils to ard.utils.core and remove init import of utils

* fix typo

* run black

* add initial documentation explanation for utils

* move create_FLORIS_turbine to floris.py and for load_turbine_spec to utils/io.py

* update docs for utils with new io file

* include io.py

* Feature/offshore development geomorphology (#64)


* added in some geomorphology stuff, but it's not quite done yet.

* geomorphology touchups

* added testing and increasingly good geomorphology

* fully tested geomorphology up to but excluding point estimation

* Update test/unit/ard/test_geomorphology.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* fix typo

* added the pyrite file

* geomorphology most of the way

* add pyrite file

* updated geomorphology. slightly cleaner.

* update dependencies

* typo fix from copilot on test/unit/ard/test_geomorphology.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* realized a better way to do parent class and redid a bunch... like a moron

* fix bathymetery notebook for recent changes.

* some fixes

* reorganize and slightly update tests

* continuing to address jareds recommendations

* forgot pyrite

* derivatives only on interp call

* @jaredthomas68 offered me a blue pill and a red pill and i took the red one and could suddenly see pytest subtests all around me.

* update array equality nitpick from copilot

* black reformat

* updates for jared's suggestions toward PR

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Boundary (#67)

* include utility functions for polygon boundary constraints

* rename get_closest_point to get_closest_point_on_line_seg

* include tests for point_on_line

* include unit tests for single_polygon_normals_calculator

* vectorize single_polygon_normals_calculator

* jit normals calculator

* include multi-polygon normals tests with heterogenous polygon shapes and point counts and a generaic polygon_normals_calculator

* stash polygon work for a bit

* minor comment update

* loosen rtol for point_to_polygon numeric deriv check

* switch from jit decorator to jit function

* get multi-point multi-polygon working unvectorized

* vectorize and make multi point to multi polygon function differentiable

* get derivatives working for multi point to multi polygon distance

* add tests for get_nearest_polygons

* do sparse patrial computation for polygon boundary and include derivative tests for boundary component

* include boundary and related unit tests

* update shift default back to 1E-10

* run black

---------

Co-authored-by: Cory Frontin <cory.frontin@nrel.gov>

* add replace markers

* fix opt demo

* silly un-reversion to preserve history

* Propogate python version (#70)

* (prep to) liberate python 3.13 (#69)

* liberate python 3.13

* actually liberate python

* update testing

* version number inequality fix

* walkback python for backdated wisdem

* propogate to tests

* liberate python 3.13

* remove extraneous whitespace

* Pull up testing settings to match develop and main

* update dependencies

* revert wisdem to match main rather than dev

* silly un-reversion to preserve history

* Propogate python version (#70)

* (prep to) liberate python 3.13 (#69)

* liberate python 3.13

* actually liberate python

* update testing

* version number inequality fix

* walkback python for backdated wisdem

* propogate to tests

* liberate python 3.13

* remove extraneous whitespace

* Docs (#71)

* reorganize docs to follow the Divio paradigm

* add instructions for building and viewing the documentation locally

* update readme with test badges and docs link

* fix ASCII diagram to render properly in docs build

* fix typo

* Offshore development: improve documentation (#74)

* extend docstrings, clean up comments, and do some minor refactoring

* rename violation_distance to mooring_spacin

* update docstrings for mooring distances

* include offshore fixed-foundation example (#77)

* include offshore fixed-foundation example

* Prep for offshore meeting (#78)

note: some temporary code is in the examples, to facilitate cooperative development

---

* update dependencies

* revert wisdem to match main rather than dev

* silly un-reversion to preserve history

* Propogate python version (#70)

* (prep to) liberate python 3.13 (#69)

* liberate python 3.13

* actually liberate python

* update testing

* version number inequality fix

* walkback python for backdated wisdem

* propogate to tests

* liberate python 3.13

* remove extraneous whitespace

* rename mooring design to create space for detailed mooring design

* updated geomorphology/material data storage objects

* added detailed mooring design example

* forgot example script

* Better temporary script (#79)

* update dependencies

* revert wisdem to match main rather than dev

* silly un-reversion to preserve history

* Propogate python version (#70)

* (prep to) liberate python 3.13 (#69)

* liberate python 3.13

* actually liberate python

* update testing

* version number inequality fix

* walkback python for backdated wisdem

* propogate to tests

* liberate python 3.13

* remove extraneous whitespace

* rename mooring design to create space for detailed mooring design

* updated geomorphology/material data storage objects

* added detailed mooring design example

* forgot example script

* reorganize example

* Landbosse cable connection from optiwindnet (#80)

* add primary spacing approximation and unit tests for converting from interarray to landbosse
* switch onshore example to use approximate connection between cable design and landbosse

* point to floris release version instead of develop

* remove detailed mooring import

* remove unnecessary commented code

* run black

* remove secondary setup_partials method from PlaceholderAEP

* Feature/bos layout improvement (#73)

* capitalize ORBIT acronym everywhere

* fix merge issues

* small fixes

* update dependencies

* revert wisdem to match main rather than dev

* silly un-reversion to preserve history

* Propogate python version (#70)

* (prep to) liberate python 3.13 (#69)

* liberate python 3.13

* actually liberate python

* update testing

* version number inequality fix

* walkback python for backdated wisdem

* propogate to tests

* liberate python 3.13

* remove extraneous whitespace

* rename mooring design to create space for detailed mooring design

* updated geomorphology/material data storage objects

* added detailed mooring design example

* forgot example script

* reorganize example

* add glue design doc temporarily (#89)

* copy in input files for IEA 740 10 ROWP

* reorganize example 01 a bit

* wip

* glue code working, but not with wisdem yet

* minor typo correction

* recursive glue mostly working

* run script and input file for glue code example

* attempt to get laten variable setting working with glue code

* remove spacing connection to landbosse in favor of approximation from optiwindnet

* update wisdem wrap and onshore and offshore examples to accomodate more generic latent variable set up

* correct logic and which landbosse components are used

* remove unneeded group and adjust calls from group to component

* run black

* more comments, and break out duplicate code into its own function

* add test for set_values

* try turning off numba jit to see if that solves the numba problem

* remove disable numba jit

* address circular import

* pin numpy

* only install ard once for each test suite

* pin numpy to 1.24.3

* pin numpy to 2.0

* pin numpy < 2.3

* cap numpy at 2.3 for numba compatibility

* restrict python version to less than 3.13

* remove comments

* use test dependencies for optiwindnet

* pin optiwindnet version

* run black

* Develop (#99)

* (prep to) liberate python 3.13 (#69)

* liberate python 3.13

* actually liberate python

* update testing

* version number inequality fix

* walkback python for backdated wisdem

* propogate to tests

* remove comments

* get latent variable setting working automatically

* get 02_onshore running

* fix mapping bug in glue code

* get optimization working for onshore example using glue code

* optimization onshore example working with gluecode prototype

* include convergence plot

* run black

* remove commented connections

* update onshore example for new glue code

* update file paths

* update onshore example to use set_up_ard_model

* Improve feature/system tests (#100)

* (prep to) liberate python 3.13 (#69)

* liberate python 3.13

* actually liberate python

* update testing

* version number inequality fix

* walkback python for backdated wisdem

* propogate to tests

* remove comments

* constraint testing added

* black reformatting

* added updated pyrite

* system test added but not complete for mooring packing

* add forgotten file

* Black reformat

* switch to using OM derivative checks, clean up

* black reformat

* Update test/system/ard/geometry/test_constraints.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update test/system/ard/geometry/test_constraints.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update test/system/ard/offshore/test_mooring_packing.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update test/system/ard/offshore/test_mooring_packing.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update test/system/ard/geometry/test_constraints.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* tidy comments

* fix the problem discovered by the not problem that jared pointed out hahahaha

* barely avoided ragequitting due to black reformat

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Feature/wisdem upgrade (#102)

* (prep to) liberate python 3.13 (#69)

* liberate python 3.13

* actually liberate python

* update testing

* version number inequality fix

* walkback python for backdated wisdem

* propogate to tests

* remove comments

* update pyrite values

* fixes to 3.21 rather than 3.20

* update test utils for clarity

* a little more improvement to the test utils

* black reformat...

* wip creating default systems for ard api

* move LCOE stack tests into api test directory

* wip api

* api unit test

* bring clarity to pyrite test

* working out wisdem differences

* wip debug wisdem

* roll back to older ard compoent

* wip working on debugging LandBOSSE Ard wrapper

* restore old landbosse comp naming

* get all tests passing

* convert LCOE stack test to new glue code

* fixing tests with new inputs

* new files to work with path restrictions

* all tests passing again

* set up offshore fixed bottom and floating w/o cable default systems

* include new default systems in unit test

* run black

* include default system design files

* including initial des var values in modeling options

* use total capex from landbosse and bos capex in financese

* use decorator

* include input files

* run black

* include input files for onshore example

* include deprecated api

* working towards offshore optimization demo refactor, still not matching on optimization results

* black refactor

* black reformat 2

* fixed 03_offshore

* cleared out offshore folder of extraneous example data, still need to move two ipynb files and can delete outdated offshore example

* remove old FLORIS power comparison examples, they're no longer relevant

* debugging

* run black

* edit .gitignore and include example 04_offshore_fixed

* update offshore fixed example for glue code

* swap numbering for fixed and floating examples

* run black

* include inputs for all examples

* include system tests for new glue code for floating and offshore fixed

* run black

* include offshore fixed and floating systems defaults with cable design

* include system test inputs for offshore fixed and floating tests

* close back ticks in docstring

* remove deprecated examples

* update doc strings

* update doc string

* update doc string

* updated the example, removed LCOE stack

* black reformat

* include approx totals in all default systems and remove old debug code

* run black

* Update test/unit/ard/farm_aero/test_templates.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update test/system/ard/api/test_LCOE_OFL_stack.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update test/unit/ard/farm_aero/test_templates.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* remove trailing comma and comment out unused check tol

* Update OptiWindNet to version 0.0.4 (#101)

* chore: bump optiwindnet version to 0.0.3 and make pyproject.toml include subpackages

* fix: overhaul of optiwindnet_wrap to work with v0.0.3

* fix: update demos to use path relative to demo script and optiwindnet v0.0.3

* wip: initial adjustment of optiwindnet tests to v0.0.3

Many more changes are needed since the two level wrapping was changed to a single level. Also the tests are not taking into account links between turbines that use detours or contours and, therefore, have lengths that do not correspond to the Euclidean distance between the coordinates.

* fix: add border features to site in optiwindnetCollection.site_from_inputs()

* chore: clean up confusing code comments

* chore: black-format .py files

* wip: attempt to fix CI errors by using main branch of statsmodels

* Change optiwindnet to v0.0.4 to fix error on MacOS

* fix: update obsolete mip_rel_gap to mip_gap

* fix: new data structure for optiwindnet-generated data

The cable lengths and loads are ordered in robust way. If the networks are the same, the length/load values must match independent of platform. To guarantee that the solution
network is the same, the optimum must be unique and there must be enough time to reach it

* lint with black

* fix: reference to outdated appsi_highs

* chore: improved docstring and type hinting

* fix: add missing import

* fix: test failure due to length_cables being an output but not having partials calculated

The OpenMDAO check_partials() expects partials for all declared outputs. Since partials wrt the length_cables array are not calculated in compute_partials(), the length_cables output was moved to discrete_outputs().

* test: add test with border to improve code coverage

* lint with black

* minor changes to accomodate optiwind net version update

* run black

* Bugfix: gluecode model options (#113)

* hotfix

* add the actual hotfix

* update all examples

* added example testing routine to test

* adjust cwd command

* reorganize some examples

* attempt fix

* black reformat, pip statsmodels again after their hotfix

* ok think i fixed it

* cleanup runner

* try system-agnostic runner

* try system-agnostic runner again

* indent fix

* turn off n2 diagrams

* test consolidated CI/CD workflow

* attempt improved consolidated script

* direct parallel example runner test

* complete runner code

* a new test that should maybe actually work

* add missing file and quotation marks

* switch to consolidated with parallel examples

* rectify author attribution in pyproject.toml

* remove commented dependency

* cleaner gui interaction

* modified consolidated tests

* faster consolidated ci/cd

* rollback action

* take 2 on caching

* update dependency

* slight bugfix mod

* try cache again

* iterating on cicd cache

* reorder

* rename
 test

* address some of jareds comments and remove commented code

* black reformat

* Update README.md with new badge order

* ORBIT BOS upgrade for detailed farms, redux (#106)

* re-try the bos-layout-improvement branch

* Update ard/cost/orbit_wrap.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* black reformat

* update collection stuff after PRs, address some of jareds comments

* black reformat

* addressing more of jareds commentary

* fixed jareds concerns

* black reformat...

* remove some deprecated debugging statements while i'm at it

* missed one, comment touch-up

* switch to radial for examples, add outputs

* address error message

* add radial branching testing

* updated cable length availability list, modified to used dynamic w/ floating and not otherwise

* black reformat

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update README.md badge

* Improved OM driver interface, take II (#123)

* enable passing opt_settings to openmdao

* rename variables for copilot suggestions

* black reformat

---------

Co-authored-by: Jared Thomas <jaredthomas68@gmail.com>

* WindIO conversion (#120)

* work in progress

* more progress on the windIO-plant integration

* black reformat and some changes to FLORIS

* farm aero with windIO seems to be working

* updated up to landuse

* changes to unit testing plus some black reformatting

* layouts completely ready for windIO

* farm_aero templates updated for windio

* some floris progress, now outdated; re-factor begin to get windIO_plant in modeling_options

* more working through the refactor

* working through layout now

* layout done

* more updates, buggy floris still

* floris bug fixed

* touch-ups

* black reformat

* updated FLORIS example to share windIO_plant turbine plugin

* fixed the system constraint test...

* remove old code

* remove outmoded data

* WIP working through system tests, some renames of shared data files

* windIO seems to be pushed through all unit/system tests except ones requiring WISDEM-derived components

* remove debug stuff

* wisdem update

* black reformat

* orbit failing tests but integrated

* adjusted setup latents... not sure about it yet...

* adjustments

* black reformat

* Update pyproject.toml to include windio

* temporary disable

* uncomment system

* enable passing opt_settings to openmdao

* merging some of jareds changes

* pyrite adjustment with working WISDEM stuff less detailed ORBIT

* tests progressing

* get example 01_onshore working with update wisdem interface

* remove example _01

* unit tests appear to be working

* orbit and wisdem wraps updated and functioning w.r.t. unit tests

* black reformat

* landbased fixed, aep only major deviation due to fixed typo in windio branch

* adjusting for some changes, cleaning out documentation swaps

* remove old doc string hangarounds

* black

* what a slog... making progress

* no more ERRORS just FAILURES, and some really significant one so something is definitely wrong. unit tests are still working well

* AEP from batch aero

* remove trailing space and black

* system tests much cleaner.

* update pyrite and other reference values

* update example 03

* move plot stuff in example 1 to ard.viz

* allow plotting of boundaries and cabling in single plot call

* oops forgot some stuff and now some work on 02 also

* 03 working 02 working

* update 01

* rename optiwindnet_coll to collection

* cleaner formatting

* black reformat

* specify units in latents

* tonne fix

* more tonnes of fixes

* a tonne yet still i hath not seen

* WIP modifications for getting the units right

* fix units

* fixed unit issues

* nicer names in the example yamls

* black reformat

* Update test/unit/ard/farm_aero/test_floris.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* fix black thanks to copilot...

* tranche no. 1 of jared edits

* remove old files, correct ard_system in example 01

* adjust unit tests to function w/ TI

* fix some small issues

* small tidy

* more tidy

* tranche two

* run windIO plant validation by default before setting up the ard system

* added template docstrings

* added viz docstrings

* more addressment of jareds comments

* addressed reference question

* hotfix the example 03 wind resource

* final edits for squash

* one more time.... evenutally gonn get TIs right

---------

Co-authored-by: Jared Thomas <jaredthomas68@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Hotfix/floris zeroed prob (#127)

* fix the floris issue

* actual fix

* black config

* Clarify thrust data unpacking process w/ git reference

* streamline based on copilot suggestion

* fix failing floris test

* Change optiwindnet version constraint to exact match

* Cherry-pick key general improvements from offshore-development for beta (#136)

* cherrypick some improvements for beta out of offshore-development

* black reformat

* address copilot comments

* Docs overhaul (#133)

* enable passing opt_settings to openmdao

* some touch-ups to get started

* updates to logo and documentation

* cherrypick some improvements for beta out of offshore-development

* black update

* black reformat

* address copilot comments

* update some docs

* addressing jared comments

* update installation page

* a tranche of docs mods

* a new tranche of edits

* more cleanup

* adjust some busted windio yamls and involved documentation

* update with examples

* example one working it appears

* attempt nb example stuff

* adjust find nb script

* adjust again

* save example 02 notebook

* added example 02 to docs

* add jupyter to dev requirements

* temporary withhold non-notebook tests, and update 02 notebook.

* update file location

* update examples

* try try again

* actually relative paths are apparently better...

* update through ex 03

* re-enable full testing sweet

* tiny fix

* fix wordiness

* docs playing nicely now

* reorganize mv typo

* fix consolidated CI/CD to restore precedence.

* incorporate pietro's comments from cfrontin/Ard PR#4

---------

Co-authored-by: Jared Thomas <jaredthomas68@gmail.com>

* fix: make optiwindnet wrapper compatible with optiwindnet v0.0.6 (#135)

* fix: make optiwindnet wrapper compatible with optiwindnet v0.0.6

* fix: optiwindnet's version must be >= 0.0.6, otherwise OWNWarmupFailed is not available

* fix: add missing model_option filter for using EW_presolver

---------

Co-authored-by: Cory Frontin <cory.frontin@nrel.gov>

* Fix badge link in README.md

* fix to floris reference height (#140)

* fix to floris reference height

* update after floris ref height and density fix

* black reformat

* remove outmoded coveragerc entries.

---------

Co-authored-by: Jared Thomas <jaredthomas68@gmail.com>
Co-authored-by: Jared Thomas <jaredthomas68@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Mauricio Souza de Alencar <856825+mdealencar@users.noreply.github.com>

* fix fstrings (#141)

* bump docs for re-build

* nudge docs to trigger re-build

* Uncomment modeling_options in floris.py documentation to remove jupyter-book error

* nudge docs to trigger build

* Increase notebook execution timeout from 120 to 180

* Add files via upload

* Add conditional checks for example script runners

* Update CI/CD badge link to main branch

* Typo fix

* typo fix 2!

* cleaner comment

---------

Co-authored-by: Jared Thomas <jaredthomas68@gmail.com>
Co-authored-by: Jared Thomas <jaredthomas68@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Mauricio Souza de Alencar <856825+mdealencar@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bugfix: new gluecode misses optiwindnet option configuration

2 participants